﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DataBase.Daihoctuonglai;

namespace dai_hoc_tuong_lai.Areas.Admin.Models
{
    public class TopicModel
    {
        public int Id { get; set; }
        public string Title { get; set; }
        public string Noidung { get; set; }
        public string keyword { get; set; }
        public string Desription { get; set; }
        public string keyTitle { get; set; }
        public Nullable<System.DateTime> NgayTao { get; set; }
        public string Code { get; set; }

        public static void MapFrom(TopicModel Model, ref Topic entity)
        {
            entity.Id = Model.Id;
            entity.Title = Model.Title;
            entity.Noidung = Model.Noidung;
            entity.keyword = Model.keyword;
            entity.Desription = Model.Desription;
            entity.keyTitle = Model.keyTitle;
            entity.NgayTao = Model.NgayTao;
            entity.Code = Model.Code;
            
        }

        public static void MapFrom(Topic entity, ref TopicModel Model)
        {
            Model.Id = entity.Id;
            Model.Title = entity.Title;
            Model.Noidung = entity.Noidung;
            Model.keyword = entity.keyword;
            Model.Desription = entity.Desription;
            Model.keyTitle = entity.keyTitle;
            Model.NgayTao = entity.NgayTao;
            Model.Code = entity.Code;
        }
    }
}